<%-- 
    Document   : addProduct
    Created on : May 24, 2012, 1:24:35 PM
    Author     : ciummo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<script language="javascript" type="text/javascript" src="/DGestWebServer/SCRIPT/jquery.min.js"></script>
<script type="text/javascript" src="/DGestWebServer/SCRIPT/jquery.ui.core.js"></script>
<script type="text/javascript" src="/DGestWebServer/SCRIPT/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="/DGestWebServer/SCRIPT/ui.datepicker-it.js"></script>

<link href="/DGestWebServer/SCRIPT/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="/DGestWebServer/SCRIPT/ui.datepicker.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
    $(document).ready(function(){
        $('#datepickerId').datepicker({ dateFormat: 'dd/mm/yy' });
    });
</script>  

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="/DGestWebServer/css/dgest.css"/>
        <title>JSP Page</title>
    </head>
    <body>
        
         <%@ include file="../adminDialogBar.jspf" %> 
         
        <h1>Inserimento Nuovo Prodotto</h1>
        
        <div class="error">
            <html:errors />
        </div>
        
        <html:form action="Product?method=submitNewProduct" method="POST" enctype="multipart/form-data">
             
            <table class="center"><tbody>

                <div id="OrderInformation">
                    
                    <tr><td><h2>Dettagli Nuovo Prodotto</h2></td></tr>
                    
                    <tr>
                        <td>id Ordine-Prodotto: </td>
                        <td><html:text name="ProductActionForm" property="idOrdineProdotto" style="background:yellow"  readonly="true"></html:text></td>
                    </tr>         
                    
                    <logic:notEqual name="ProductActionForm" property="idOrdineProdotto" value="0">
                     <tr>
                        <td>Codice Articolo: </td>
                        <td><html:text name="ProductActionForm" property="codArticolo" style="background:yellow" readonly="true"></html:text></td>
                    </tr>
                    </logic:notEqual>

                    <logic:equal name="ProductActionForm" property="idOrdineProdotto" value="0">
                     <tr>
                        <td>Articolo: </td>
                        
                         <td>
                            <html:select property="articoli" >
                            <html:option value="0">Ruolo</html:option>
                                <html:optionsCollection name="ProductActionForm" property="codArticolo" label="title" value="title"/>
                            </html:select>
                         </td>
                        
                    </tr>
                    </logic:equal>                    
                    
                    <tr>
                        <td>Serial Number: </td>
                        <td><html:text name="ProductActionForm" property="serialeProdotto" ></html:text></td>
                    </tr>
                    
                    <tr>
                        <td>Data di produzione: </td>
                                                <td><div id="datepicker">
                            
                                <html:text name="ProductActionForm" property="dataProduzione" styleId="datepickerId" maxlength="10" /></div></td>
                    </tr>
                    
                    <tr>
                        <td>Note: </td>
                        <td><html:text name="ProductActionForm" property="note" ></html:text></td>
                    </tr>                     
                    
                    
                    <tr>
                        <td>
                            <html:submit>
                                Submit
                            </html:submit>

                            <html:cancel>
                                Cancel
                            </html:cancel>
                        </td>
                    </tr>
                    
                    
                    
            </table></tbody>
                    
        </html:form>

                
        
    </body>
</html>
